package com.hspedu.innerclass;

public class Homework03 {
    public static void main(String[] args) {
        Animal cat = new Animal(){
            public void shout() {
                System.out.println("猫会喵喵叫");
            }
        };
        Animal dog = new Animal(){

            @Override
            public void shout() {
                System.out.println("猫会喵喵叫");
            }
        };
        cat.shout();
        dog.shout();


    }
}


abstract class Animal
{
    abstract public void shout();
}